

$("#loginBtn").click(function(){

	var url = ctx+"/login";
	$.ajax({
	type: "POST",
					url: url,
			    	data: $("#loginForm").serialize(),
			    	dataType:"json",
					success: function(data){
						alert(data);
						
						if("success"==data.result){
							alert("登录成功!");
							window.location.href=ctx+"/welcome";
						}else {
							$("#msg").html(data.result);
						}
					}
	})
});